<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>

    <script src="vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
	
		const nums = [10,20,30,100,400,20,50]
		let total = nums.filter(function(n){
			return n<100
		}).map(function(n){
			return n*2
		}).reduce(function(preVal,n){
			return preVal+n
		},0)
		console.log(total);
		
		let total2 = nums.filter(n=>n<100).map(n=>n*2).reduce((pre,n)=>pre+n,0);
		console.log(total2);
</body>
</html>